package com.hermit.alaskagulfcustom.controller;

import com.baomidou.mybatisplus.plugins.Page;
import com.hermit.alaskagulfcustom.service.UserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author hermit
 * @data 2021/6/15
 */
@Controller
public class UserController {
    private Logger logger = LoggerFactory.getLogger(UserController.class);

    @Autowired
    private UserService userService;

    @ResponseBody
    @RequestMapping("/page")
    public Object selectPage() {
        logger.info("成功调到了分页查询接口");
        Page page = new Page(0, 10);
        page = userService.selectUserPage(page, 0);
        return page;
    }
}
